
# 递归写法
def get_fibonaqi_num(fir, sec, n):
    if n <= 0:
        return 0
    if n < 3:
        return 1
    if n == 3:
        return fir + sec
    else:
        return get_fibonaqi_num(sec, fir+sec, n-1)

# 最强写法
def get_fibonaqi_num2(n):
    fir, sec = 0, 1
    if n <= 0 :
        return 0
    if n < 3 :
        return 1
    for x in range(n-1):
        fir, sec = sec, fir + sec
    return sec


if __name__ == '__main__':
    print(get_fibonaqi_num(1, 1, 15))
    print(get_fibonaqi_num2(15))
